package com.wsh.controller.sys;

import com.wsh.sys.MenuService;
import com.wsh.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/getTree")
    public Object getTree() {
        return JsonResult.success(menuService.getRoleTree("0"));
    }
}
